{extend name="base_iframe" /}

{block name="body"}
<section class="content-header">

</section>

<section class="content">

  <!-- 列表 -->
  <div class="row">
    <div class="col-xs-12">

      <div class="box box-info">

        <div class="box-header">
        {if condition="show_auth('admin/AdminUser/add')"}
          <a href="javascript:;" data-url="{:url('add')}" proc-url="{:url('addProc')}" title="添加属性" data-type-id="{$type_id}" class="btn btn-success btn-social-icon add-btn"><i class="fa fa-plus-square"></i></a>
        {/if}

          <a href="javascript:location=location" title="刷新" class="btn btn-default btn-social-icon"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></a>
          <b style="color:#444">&nbsp;&nbsp;&nbsp;属性总数：{$info->total()}</b>
        </div>

        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tr class="vertical-c">
              <th>ID</th>
              <th>属性名称</th>
              <th>能否检索</th>
              <th>可选值</th>
              <th>排序值</th>
              <th>操作</th>
            </tr>
            {volist name="info" id="v"}
            <tr class="vertical-c">
              <td>{$v.id}</td>
              <td>{$v.attr_name}</td>
              <td>{$v.search_index? '能' : '否'}</td>
              <td>{$v.opts? $v.opts : '--'}</td>
              <td>{$v.seq}</td>
              <td>

                {if condition="show_auth('admin/AdminUser/edit')"}
                  <a href="javascript:;" title="编辑" data-id="{$v.id}" data-url="{:url('edit')}" proc-url="{:url('editProc')}" class="btn btn-xs btn-info btn-social-icon edit-btn"><i class="fa fa-pencil"></i></a>
                {/if}

                {if condition="show_auth('admin/AdminUser/delete')"}
                  <a href="javascript:;" title="删除" data-id="{$v.id}" data-url="{:url('delete')}" class="btn btn-xs btn-danger btn-social-icon delete-btn"><i class="fa fa-trash-o"></i></a>
                {/if}
              </td>
            </tr>
            {/volist}
          </table>
        </div>

        <div class="box-footer clearfix">
            {$info->render()}
        </div>
      </div>

    </div>
  </div>


</section>

{/block}

{block name="script"}
  <script type="text/javascript" src="__AJS__/type_attr/index.js"></script>
{/block}